Repository navigation
Conversation
Agents can give users all their form responses as a CSV file, through a 15-minute download link that works only for the user who asked.
|
Are you an Automattician? Please test your changes on all WordPress.com environments to help mitigate accidental explosions.
Interested in more tips and information?
|
|
Thank you for your PR! When contributing to Jetpack, we have a few suggestions that can help us test and review your patch:
This comment will be updated as you work on your PR and make changes. If you think that some of those checks are not needed for your PR, please explain why you think so. Thanks for cooperation 🤖 Follow this PR Review Process:
If you have questions about anything, reach out in #jetpack-developers for guidance! Jetpack plugin: The Jetpack plugin has different release cadences depending on the platform:
If you have any questions about the release process, please ask in the #jetpack-releases channel on Slack. |
Code Coverage SummaryCoverage changed in 2 files.
1 file is newly checked for coverage.
|
Keep the link's record for a day, so a link opened after its 15 minutes says it expired instead of that it doesn't work for the account. Add tests for the download handler and the 50-form cap, tighten the export tests, and run the tests that send headers in separate processes for PHPUnit 9.
The WordPress.com MCP checks reject new negative imperatives in ability text. The link already works only for the user who asked, so the description states that.
The wpcom cross-tool reference check fails when one ability's text names another.
Read export dates in site time, so a date with a timezone no longer shifts by the site's UTC offset. Count responses and list forms in SQL, so the ability does not load every response into memory. Leave flagged test responses out of the count, so a link is not returned for a file with no rows. Send signed-out users through auth_redirect(), so the link survives a login on another host.
The closure always throws, and Phan fails the static analysis check unless a function like that is documented with @return never.
Fixes #
Proposed changes
jetpack-forms/export-responsesability. It returns a download link for the same CSV file as the Export button, with the same filters and theexportcapability check.Why: agents can now give users all their responses as a file, instead of reading them in pages.
Related product discussion/links
Does this pull request change what data or activity we track or use?
No.
Testing instructions
remote:jetpack-forms/export-responsesthrough an MCP client like MCP Inspector (send{"form_id": <id>, "include_test_responses": true}to filter to a specific form), or ask your connected agent to export your form responses.download_urland compare the CSV with the one the Export button makes in the wp-admin.